function htmlEntities(str) {
    return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;')
                .replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
$(document).ready(function(){    
    $.getJSON('./proses/proses_baca_karyawan.php', function(output){        
        var no = 1;
        $.each(output, function(key,value){            
            $("#tbl-kry").append( "<tr>" +     
                "<td>" + no++ + "</td>" +
                "<td>" + value.nama + "</td>" +
                "<td>" + htmlEntities(value.alamat) + "</td>" +
                "<td>" + value.telp + "</td>" +
                "<td>" + value.email + "</td>" +
                "</tr>" );
        });
    }).error(function(){
        alert('error');
    }); 
});